import Vue from 'vue'
import VueRouter from 'vue-router'

// 导入注册组件
import Login from '../views/Login/Login.vue'
import Reg from '../views/Reg/Reg.vue'
import Main from '../views/Main/Main.vue'

Vue.use(VueRouter)

const routes = [
    {
      path: '/reg',
      name: 'reg',
      component:Reg
    },
    {
      path: '/login',
      name: 'login',
      component:Login
    },
    {
      path: '/',
      name: 'main',
      component:Main
    },
]

const router = new VueRouter({
  routes
})

export default router
